<?php
/**
* WordPress-Amfphp Integration
* Version: 0.1
* Author: Enrique Chavez aka Tmeister
* Init Date Jan-26, 2007
* Class Description: Main Class, Configuration and batabase connection
*
*/
class awiDB
{
	var $dbUser = "";
	var $dbPass = "";
	var $dbName = "";
	var $dbHost = "";
	var $wpdb;
	var $dbh;
	/**
	 * Connect blog's Database
	 */
	function getDb()
	{
		$this->dbh = mysql_connect($this->dbHost, $this->dbUser, $this->dbPass);
		mysql_select_db($this->dbName, $this->dbh);
		$table_prefix  = 'wp_';
		$this->wpdb->posts          = $table_prefix . 'posts';
		$this->wpdb->users          = $table_prefix . 'users';
		$this->wpdb->categories     = $table_prefix . 'categories';
		$this->wpdb->post2cat       = $table_prefix . 'post2cat';
		$this->wpdb->comments       = $table_prefix . 'comments';
		$this->wpdb->link2cat       = $table_prefix . 'link2cat';
		$this->wpdb->links          = $table_prefix . 'links';
		$this->wpdb->options        = $table_prefix . 'options';
		$this->wpdb->postmeta       = $table_prefix . 'postmeta';
		$this->wpdb->usermeta       = $table_prefix . 'usermeta';
	}
}
?>